1. Field Of The Invention
This invention relates to display memory systems and, more particularly, to methods and apparatus for accelerating the rate at which data defining the depth of a three dimensional image may be stored in a depth (Z) buffer memory.
2. History Of The Prior Art
A typical computer system generates data which is displayed on an output display. This output display is typically a cathode ray tube which produces a number of full screen images one after another so rapidly that to the eye of the viewer the screen appears to display constant motion when a program being displayed produces such motion. In order to produce the individual images (frames) which are displayed one after another, data is written into a frame buffer. The frame buffer stores information about each position on the display which can be illuminated (each pixel) to produce the full screen image. For example, a display may be capable of displaying pixels in approximately one thousand horizontal rows each having approximately twelve hundred pixels. All of this information in each frame is written to the frame buffer before it is scanned to the display.
The data which defines each pixel may vary from the amount necessary to describe a simple black and white monochrome output to that required to describe a great number of colors and shades of those colors. For example, a typical color pixel in more advanced systems is defined by eight bits each of red, green, and blue color information, and an additional eight bits of alpha (luminosity) information.
If, in addition, the system is capable of displaying three dimensional images, some amount of data regarding the depth of each pixel is necessary. In a typical system, twenty-four bits may be stored to record the depth or Z value of each pixel. This information is stored in a buffer memory referred to as a Z buffer which is associated with the frame buffer. A Z buffer used with a frame buffer which stores data for 1280 by 1024 pixels thus contains memory for storing twenty-four bits of data at 1280 by 1024 positions on the display.
When data describing an entire frame exists in the frame buffer, the data describing the frame may be transferred to the display. Typically, data is transferred from the frame buffer to the display pixel by pixel and line by line beginning at the upper left hand corner of the display and proceeding horizontally from left to right, line by line, downwardly to the lower right hand corner of the display. In order for the picture to appear continuous on the output display, the successive frames in the frame buffer must be constantly scanned to the output display at a rate of sixty frames per second or more. Scanning this large number of frames to the display each second allows the eye to integrate the images so that it sees no single frame but a smoothly flowing continuous sequence of motion without any visible flickering when motion is presented.
While each frame of data is being scanned to the display, new data to appear in the next frame must be transferred to the frame buffer and to the associated Z buffer. Since so many frames are necessary each second in order to describe motion, an enormous amount of data must be written to the frame buffer and its accompanying Z buffer to sustain the rate at which information is scanned to the display.
When three dimensional data is being written to the frame buffer so that it may be scanned to the display, it is necessary to compare the depth of each new pixel with the depth of the pixel presently stored in the position of that pixel in the frame buffer to see whether the new pixel data appears in front of the pixel being displayed. If so, the new pixel should be displayed instead of the old pixel; if not, the old pixel data remains. This comparison requires that data stored in the pixel position in the Z buffer be read, be compared to the new Z data, and, if necessary, the new Z data be written to the pixel position in the Z buffer. In a situation in which merely keeping up with the operation of writing is a problem, the time required for the read/compare/write operation may mean that swiftly moving operations cannot be presented on the display.